Optimal. Leaf size=107 \[ -\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (c x+1)}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (c x+1)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{b^2}{2 c d^2 (c x+1)}+\frac{b^2 \tanh ^{-1}(c x)}{2 c d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.124376, antiderivative size = 107, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {5928, 5926, 627, 44, 207, 5948} \[ -\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (c x+1)}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (c x+1)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{b^2}{2 c d^2 (c x+1)}+\frac{b^2 \tanh ^{-1}(c x)}{2 c d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5928
Rule 5926
Rule 627
Rule 44
Rule 207
Rule 5948
Rubi steps
\begin{align*} \int \frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{(d+c d x)^2} \, dx &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{(2 b) \int \left (\frac{a+b \tanh ^{-1}(c x)}{2 d (1+c x)^2}-\frac{a+b \tanh ^{-1}(c x)}{2 d \left (-1+c^2 x^2\right )}\right ) \, dx}{d}\\ &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{b \int \frac{a+b \tanh ^{-1}(c x)}{(1+c x)^2} \, dx}{d^2}-\frac{b \int \frac{a+b \tanh ^{-1}(c x)}{-1+c^2 x^2} \, dx}{d^2}\\ &=-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{b^2 \int \frac{1}{(1+c x) \left (1-c^2 x^2\right )} \, dx}{d^2}\\ &=-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{b^2 \int \frac{1}{(1-c x) (1+c x)^2} \, dx}{d^2}\\ &=-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{b^2 \int \left (\frac{1}{2 (1+c x)^2}-\frac{1}{2 \left (-1+c^2 x^2\right )}\right ) \, dx}{d^2}\\ &=-\frac{b^2}{2 c d^2 (1+c x)}-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}-\frac{b^2 \int \frac{1}{-1+c^2 x^2} \, dx}{2 d^2}\\ &=-\frac{b^2}{2 c d^2 (1+c x)}+\frac{b^2 \tanh ^{-1}(c x)}{2 c d^2}-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}\\ \end{align*}
Mathematica [A] time = 0.131612, size = 124, normalized size = 1.16 \[ \frac{-4 a^2+2 a b \log (c x+1)+2 a b c x \log (c x+1)-b (2 a+b) (c x+1) \log (1-c x)-4 b (2 a+b) \tanh ^{-1}(c x)-4 a b+b^2 \log (c x+1)+b^2 c x \log (c x+1)+2 b^2 (c x-1) \tanh ^{-1}(c x)^2-2 b^2}{4 c d^2 (c x+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.056, size = 341, normalized size = 3.2 \begin{align*} -{\frac{{a}^{2}}{c{d}^{2} \left ( cx+1 \right ) }}-{\frac{{b}^{2} \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}}{c{d}^{2} \left ( cx+1 \right ) }}-{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx-1 \right ) }{2\,c{d}^{2}}}-{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) }{c{d}^{2} \left ( cx+1 \right ) }}+{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx+1 \right ) }{2\,c{d}^{2}}}-{\frac{{b}^{2} \left ( \ln \left ( cx-1 \right ) \right ) ^{2}}{8\,c{d}^{2}}}+{\frac{{b}^{2}\ln \left ( cx-1 \right ) }{4\,c{d}^{2}}\ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }-{\frac{{b}^{2}\ln \left ( cx-1 \right ) }{4\,c{d}^{2}}}-{\frac{{b}^{2}}{2\,c{d}^{2} \left ( cx+1 \right ) }}+{\frac{{b}^{2}\ln \left ( cx+1 \right ) }{4\,c{d}^{2}}}-{\frac{{b}^{2}}{4\,c{d}^{2}}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) \ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }+{\frac{{b}^{2}\ln \left ( cx+1 \right ) }{4\,c{d}^{2}}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) }-{\frac{{b}^{2} \left ( \ln \left ( cx+1 \right ) \right ) ^{2}}{8\,c{d}^{2}}}-2\,{\frac{ab{\it Artanh} \left ( cx \right ) }{c{d}^{2} \left ( cx+1 \right ) }}-{\frac{ab\ln \left ( cx-1 \right ) }{2\,c{d}^{2}}}-{\frac{ab}{c{d}^{2} \left ( cx+1 \right ) }}+{\frac{ab\ln \left ( cx+1 \right ) }{2\,c{d}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.990188, size = 374, normalized size = 3.5 \begin{align*} -\frac{1}{2} \,{\left (c{\left (\frac{2}{c^{3} d^{2} x + c^{2} d^{2}} - \frac{\log \left (c x + 1\right )}{c^{2} d^{2}} + \frac{\log \left (c x - 1\right )}{c^{2} d^{2}}\right )} + \frac{4 \, \operatorname{artanh}\left (c x\right )}{c^{2} d^{2} x + c d^{2}}\right )} a b - \frac{1}{8} \,{\left (4 \, c{\left (\frac{2}{c^{3} d^{2} x + c^{2} d^{2}} - \frac{\log \left (c x + 1\right )}{c^{2} d^{2}} + \frac{\log \left (c x - 1\right )}{c^{2} d^{2}}\right )} \operatorname{artanh}\left (c x\right ) + \frac{{\left ({\left (c x + 1\right )} \log \left (c x + 1\right )^{2} +{\left (c x + 1\right )} \log \left (c x - 1\right )^{2} - 2 \,{\left (c x +{\left (c x + 1\right )} \log \left (c x - 1\right ) + 1\right )} \log \left (c x + 1\right ) + 2 \,{\left (c x + 1\right )} \log \left (c x - 1\right ) + 4\right )} c^{2}}{c^{4} d^{2} x + c^{3} d^{2}}\right )} b^{2} - \frac{b^{2} \operatorname{artanh}\left (c x\right )^{2}}{c^{2} d^{2} x + c d^{2}} - \frac{a^{2}}{c^{2} d^{2} x + c d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.05308, size = 215, normalized size = 2.01 \begin{align*} \frac{{\left (b^{2} c x - b^{2}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )^{2} - 8 \, a^{2} - 8 \, a b - 4 \, b^{2} + 2 \,{\left ({\left (2 \, a b + b^{2}\right )} c x - 2 \, a b - b^{2}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{8 \,{\left (c^{2} d^{2} x + c d^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{a^{2}}{c^{2} x^{2} + 2 c x + 1}\, dx + \int \frac{b^{2} \operatorname{atanh}^{2}{\left (c x \right )}}{c^{2} x^{2} + 2 c x + 1}\, dx + \int \frac{2 a b \operatorname{atanh}{\left (c x \right )}}{c^{2} x^{2} + 2 c x + 1}\, dx}{d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1786, size = 203, normalized size = 1.9 \begin{align*} \frac{1}{8} \,{\left (\frac{b^{2}}{c d^{2}} - \frac{2 \, b^{2}}{{\left (c d x + d\right )} c d}\right )} \log \left (\frac{1}{\frac{2 \, d}{c d x + d} - 1}\right )^{2} - \frac{{\left (2 \, a b + b^{2}\right )} \log \left (-\frac{2 \, d}{c d x + d} + 1\right )}{4 \, c d^{2}} - \frac{{\left (2 \, a b + b^{2}\right )} \log \left (\frac{1}{\frac{2 \, d}{c d x + d} - 1}\right )}{2 \,{\left (c d x + d\right )} c d} - \frac{2 \, a^{2} + 2 \, a b + b^{2}}{2 \,{\left (c d x + d\right )} c d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]